import 'package:flutter/cupertino.dart';
import 'package:schoollifedemo/base/routers.dart';
import 'package:schoollifedemo/commonwidget/common_base_viewmodel.dart';

class WelcomePageViewModel extends BaseViewModel {
  // 跳转到隐私界面
  void goToPrivacyPage(BuildContext context) {
    getApplication().routerNavigateTo(context, RoutersPath.privacyPage);
  }

  // 设置app版本号
  Future<void> setAppVersion() async {
    getChannelService()
        .getCommonChannelFunc()
        ?.setAppVersion(getApplication().getAppVersion());
  }

// 跳转到登录页面
  void gotoLoginPage(BuildContext context) {
    getApplication()
        .getRouter()
        ?.navigateTo(context, RoutersPath.loginPage, replace: true);
  }
}
